// Copyright 2024 The Google Research Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto2";

package automl_zero;

message FECSpec {
  // Number of examples to train a model in order to evaluate cache hashes.
  // Required to be smaller than or equal to the number of training examples.
  // However, for the cache to provide an advantage, should be kept much smaller
  // than the actual training examples.
  optional int64 num_train_examples = 2;

  // Number of examples to validate a model in order to evaluate cache hashes.
  // Required to be smaller than or equal to the number of validation examples.
  // However, for the cache to provide an advantage, should be kept much smaller
  // than the actual validation examples.
  optional int64 num_valid_examples = 3;

  // Number of values to keep in the cache.
  optional int64 cache_size = 4 [default = 100000];

  // If a hash is seen this many times, it will be forcibly removed from the
  // cache immediately. If set to 0, hashes are never forcibly removed (but
  // will still be removed due to LRU policy)
  optional int64 forget_every = 1 [default = 100];
}
